package com.fy.dao;

import com.fy.entity.Ce_info;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface Ce_infoMapper {
    @Select("select  * from ce_info")
    List<Ce_info> findAll();
    @Select("select * from ce_info where ce_id=#{ce_id}")
    List<Ce_info> getInfo(@Param("ce_id") String ce_id);
    @Insert("INSERT into ce_info(ce_id,ce_pic,ce_name,info_id,ce_info)values (#{ce_id},#{ce_pic},#{ce_name},#{info_id},#{ce_info})")
    int insert_ce_info(@Param("ce_id") String ce_id,@Param("ce_pic") String ce_pic,@Param("ce_name") String ce_name,
                       @Param("info_id") String info_id,@Param("ce_info") String ce_info);
    @Delete("DELETE from ce_info where ce_id=#{ce_id}")
    int delete_ce_info(@Param("ce_id") String ce_id);
}
